Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rails 7 compatiblity and rebranding #1

Merged
merged 8 commits into from
Nov 27, 2024
Merged

Rails 7 compatiblity and rebranding #1

merged 8 commits into from
Nov 27, 2024

Conversation

avonderluft
Copy link
Collaborator

  • update code, config, and tests for Rails 7
  • add github actions workflow for CI
  • Rails 5 no longer supported
  • rubocop config updated, some linting
  • add markdown option to admin/snippet
  • add image, audio, and navigation tags
  • ensure page reorder functions correctly
  • Gem build tested locally, successfully ran on a new project

- update code, config, and tests for Rails 7
- add github actions workflow for CI
- Rails 5 no longer supported
- rubocop config updated, some linting
- add markdown option to admin/snippet
- add image, audio, and navigation tags
- ensure page reorder functions correctly
- Gem build tested locally, successfully ran on a new project.
Copy link

@Judahmeek Judahmeek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only found minor issues. Nothing blocking.

## Installation

Add gem definition to your Gemfile:

```ruby
gem "comfortable_mexican_sofa", "~> 2.0.0"
gem "comfortable_media_surfer", "~> 3.0.0"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to start at v3 or revert back to v1 since the name has changed?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm leaving that decision to @justin808

README.md Outdated Show resolved Hide resolved
def comfy_paginate(scope, per_page: 50)
if defined?(WillPaginate)
scope.paginate(page: params[:page], per_page: per_page)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just for the record: Why remove support for WillPaginate?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Judahmeek - it had to do with Rails 7 compatibility, and I was being lazy. We can re-add in a future release if there's a demand for it.

----------------------------
IF YOU ARE ON RAILS 6.x
----------------------------
and encounter errors referencing webpacker:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this say Shakapacker instead?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll leave that to @justin808 I think in general we're moving on from Rails 6 and webpacker anyway.

)
assert_equal '{{ cms:page_file_link test, filename: "default.jpg", as: image }}', actual
end

def test_cms_file_link_tag
actual = cms_file_link_tag(@file)
assert_equal "{{ cms:file_link 593363170, as: image }}", actual
assert_equal '{{ cms:image default file }}', actual

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Noting test change for follow-up

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't remember details, except that this was to fix failing tests with Rails 7


assert_no_difference -> { Comfy::Cms::Snippet.count } do

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Noting that assert_no_difference was removed.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same. Fixing failing tests with Rails 7

assert_equal 'Test Snippet', snippet.label
assert_equal 'test', snippet.identifier
assert_equal 'Test Content', snippet.content
assert_equal 2, snippet.position

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Noting that snippet position changed.

If I had really been paying attention, then I would already know the reason why. 😂

@justin808
Copy link
Member

@avonderluft and @Judahmeek please merge when you guys are ready.

@avonderluft
Copy link
Collaborator Author

@justin808 - I'm going take a little time to go over @Judahmeek 's comments, and likely make adjustments accordingly before I merge. On version number, I was thinking 3.0.0 to show a new release, but also indicate continuity with ComfyMex, whose last release is 2.0.19. If you'd rather go with 1.0.0 let me know before I merge.

@avonderluft avonderluft merged commit 014d915 into master Nov 27, 2024
10 checks passed
@avonderluft avonderluft deleted the rails7 branch November 27, 2024 22:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants